package com.example.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.mapper.DishConfigurationMapper;
import com.example.domain.DishConfiguration;
import com.example.service.IDishConfigurationService;

/**
 * 菜品配置Service业务层处理
 * 
 * @author 何曼伶
 * @date 2024-09-14
 */
@Service
public class DishConfigurationServiceImpl implements IDishConfigurationService 
{
    @Autowired
    private DishConfigurationMapper dishConfigurationMapper;

    /**
     * 查询菜品配置
     * 
     * @param id 菜品配置主键
     * @return 菜品配置
     */
    @Override
    public DishConfiguration selectDishConfigurationById(Long id)
    {
        return dishConfigurationMapper.selectDishConfigurationById(id);
    }

    /**
     * 查询菜品配置列表
     * 
     * @param dishConfiguration 菜品配置
     * @return 菜品配置
     */
    @Override
    public List<DishConfiguration> selectDishConfigurationList(DishConfiguration dishConfiguration)
    {
        return dishConfigurationMapper.selectDishConfigurationList(dishConfiguration);
    }

    /**
     * 新增菜品配置
     * 
     * @param dishConfiguration 菜品配置
     * @return 结果
     */
    @Override
    public int insertDishConfiguration(DishConfiguration dishConfiguration)
    {
        return dishConfigurationMapper.insertDishConfiguration(dishConfiguration);
    }

    /**
     * 修改菜品配置
     * 
     * @param dishConfiguration 菜品配置
     * @return 结果
     */
    @Override
    public int updateDishConfiguration(DishConfiguration dishConfiguration)
    {
        return dishConfigurationMapper.updateDishConfiguration(dishConfiguration);
    }

    /**
     * 批量删除菜品配置
     * 
     * @param ids 需要删除的菜品配置主键
     * @return 结果
     */
    @Override
    public int deleteDishConfigurationByIds(Long[] ids)
    {
        return dishConfigurationMapper.deleteDishConfigurationByIds(ids);
    }

    /**
     * 删除菜品配置信息
     * 
     * @param id 菜品配置主键
     * @return 结果
     */
    @Override
    public int deleteDishConfigurationById(Long id)
    {
        return dishConfigurationMapper.deleteDishConfigurationById(id);
    }
}
